// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   SourceFile

package com.sgame.android.network;

import com.sgame.android.lang.Error;
import com.sgame.android.network.HttpOutputStream;
import java.io.File;
import java.io.InputStream;
import org.json.JSONException;
import org.json.JSONObject;

// Referenced classes of package com.mobage.ww.android.network:
//            HttpRequest, g, b, i

public final class UserPhotoUpdateRequest
{

    public UserPhotoUpdateRequest(SgameHttpClient g1, String s, File file, AsyncHttpResponseHandler b1)
    {
        a = g1;
        b = s;
        c = file;
        f = b1;
    }

    public final void Delete(HttpResponseHandler i)
    {
        HttpRequest httprequest;
        (httprequest = new HttpRequest()).setMethod("DELETE");
        httprequest.setPath((new StringBuilder("users/")).append(b).append("/photo").toString());
        a.Execute(httprequest, i);
    }

    static AsyncHttpResponseHandler a(UserPhotoUpdateRequest j1)
    {
        return j1.f;
    }

    static void Update(UserPhotoUpdateRequest request, HttpResponseHandler i)
    {
        HttpRequest httprequest;
        (httprequest = new HttpRequest()).setMethod("POST");
        httprequest.setPath((new StringBuilder("users/")).append(request.b).append("/photo").toString());
        HttpOutputStream l1 = new HttpOutputStream();
        if(request.c != null)
            l1.a("photo", request.c);
        else
            l1.a("photo", request.d, request.e);
        httprequest.setBody(l1);
        request.a.Execute(httprequest, i);
    }

    private SgameHttpClient a;
    private String b;
    private File c;
    private String d;
    private InputStream e;
    private AsyncHttpResponseHandler f;
}
